package test;

import java.sql.SQLException;

import javax.annotation.Resource;
import javax.sql.DataSource;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import analyser.Analyser;
import collector.NetCollector;
import collector.collector;
import render.PieRender;
import render.Render;

public class Action {
	
	@Resource(name="pr")
	private static Render r1;

	public static void main(String[] args) throws SQLException {
		//create Spring IOC container
		ApplicationContext context=new ClassPathXmlApplicationContext("applicationContext.xml");
		
//		
//		r1=context.getBean(Render.class);
//		r1.render();
		DataSource ds=(DataSource) context.getBean("dataSource");
		System.out.println(ds.getConnection());
		
		

	}

}
